__author__ = 'Edgard JR'

from django.db import models
from bolosdalu.models.pagina import Pagina
from PIL import Image


class Novidade(models.Model):
    titulo = models.CharField(max_length=30, null=False, unique=True, blank=False)
    imagem = models.ImageField(upload_to="img/galeria", null=False, blank=False)
    descricao = models.CharField(max_length=500, null=False, unique=True, blank=False)
    pagina = models.ForeignKey(Pagina)


    def __unicode__(self):
        return self.titulo


    class Meta:
        app_label = 'bolosdalu'